package com.mhh.selary.backend.dto.user;

import com.mhh.sdk.beans.dto.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author mhh
 * @date 2020-11-24 13:54:04
 */
@Getter
@Setter
@ApiModel("账号保存入参")
public class UserSaveDTO extends BaseDTO {

    @ApiModelProperty(value = "id")
    private Long id;

    @ApiModelProperty(value = "用户名", required = true)
    @NotBlank(message = "用户名不能为空")
    private String username;

    @ApiModelProperty(value = "角色(1:管理员 2:测试人员)", required = true)
    @NotNull(message = "角色不能为空")
    private Integer role;

    @ApiModelProperty(value = "勾选的项目")
    private List<Long> projectIds;
}
